#include"Heap_homework.h"
#define _CRT_SECURE_NO_WARNINGS 1

void test_01()
{
	Heap hp;
	HeapInit(&hp);
	HeapPush(&hp, 1);
	HeapPush(&hp, 2);
	HeapPush(&hp, 3);
	HeapPush(&hp, 4);
	HeapPush(&hp, 5);
	HeapPush(&hp, 6);

	while (!HeapEmpty(&hp))
	{
		printf("%d ", HeapTop(&hp));
		HeapPop(&hp);
	}
	HeapDestory(&hp);
}

#define N 100000


void make_file()
{
	FILE* pf = fopen("date.txt", "w");
	srand((unsigned int)time(NULL));
	for (int i = 0; i < N; i++)
	{
		fprintf(pf, "%d\n", rand());
	}
}
void test_02()
{
	//make_file();
	HeapTopK(50);

}


int main()
{
	//test_01();
	test_02();
	return 0;
}